<p:document xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:p="http://jboss.org/schema/seam/pdf"
            xmlns:s="http://jboss.org/schema/seam/taglib">
    <p:image alignment="right" wrap="true" value="/jboss.jpg" /> 
    <p:font id="test" size="24"><p:paragraph spacingAfter="50">Chart</p:paragraph></p:font>  

    <p:stroke id="dot1" width="2" cap="round" join="bevel" dash="1 2 3 4" />
    <p:stroke id="dot2" width="2" cap="round" join="bevel" dash="2 3" />

    <p:color id="foo" color="#0ff00f"/>
    <p:color id="bar" color="#ff00ff" color2="#00ff00" point="50 50" point2="300 300"/>

    <p:timeserieschart dataset="#{chartseries.dataset}" title="Time Series Chart"
                       domainAxisLabel="Domain" rangeAxisLabel="Range" foo="bar">
        <p:series key="foo" />
    </p:timeserieschart>		     

    <p:piechart title="Pie Chart" width="500" height="500" legend="true" 
               borderBackgroundPaint="#ffffff" borderStroke="dot1" borderPaint="blue" borderVisible="false"
               plotBackgroundPaint="#ffffff"  plotBackgroundAlpha="1" plotForegroundAlpha="1"
               plotOutlinePaint="blue" plotOutlineStroke="dot1"
               labelBackgroundPaint="gray"  labelPaint="white" labelLinkStroke="dot2"
               direction="anticlockwise" >
        <ui:repeat value="#{data.pieData}" var="item">
            <p:data key="#{item.name}" value="#{item.value}" sectionPaint="#777777" sectionOutlineStroke="dot2" />
        </ui:repeat>
        <p:data key="foo" value="20" explodedPercent=".2" sectionPaint="#111111" />
        <p:data key="bar" value="20" explodedPercent=".3" sectionPaint="#333333" />
        <p:data key="baz" value="20" sectionPaint="#555555" sectionOutlineStroke="dot2" />
    </p:piechart>

    <p:piechart title="3d Pie Chart" width="500" height="500" legend="true" is3D="true" backgroundPaint="bar"
                plotForegroundAlpha=".2">
        <ui:repeat value="#{data.pieData}" var="item">
            <p:data key="#{item.name}" value="#{item.value}" />
        </ui:repeat>
    </p:piechart>

    <p:barchart title="Bar Chart" width="500" height="500" orientation="vertical" legend="true">
        <p:series key="data1" seriesPaint="blue" seriesStroke="dot2"
                  seriesFillPaint="red" seriesVisibleInLegend="true"
                  seriesOutlinePaint="pink" seriesOutlineStroke="dot1">
            
            <ui:repeat value="#{data.pieData}" var="item">
                <p:data key="#{item.name}" value="#{item.value}" />
            </ui:repeat>
        </p:series>
        <p:series key="data2" seriesPaint="green"  seriesStroke="dot2">
            <ui:repeat value="#{data.pieData}" var="item">
                <p:data key="#{item.name}" value="#{item.value+10}" />
            </ui:repeat>
        </p:series>
    </p:barchart>

    <p:barchart title="Bar Chart3D" width="500" height="500" orientation="vertical" is3D="true" legend="true">
        <p:series key="data1" seriesPaint="blue" seriesStroke="dot2"
                  seriesFillPaint="red" seriesVisibleInLegend="true"
                  seriesOutlinePaint="pink" seriesOutlineStroke="dot1">
            
            <ui:repeat value="#{data.pieData}" var="item">
                <p:data key="#{item.name}" value="#{item.value}" />
            </ui:repeat>
        </p:series>
        <p:series key="data2" seriesPaint="green"  seriesStroke="dot2">
            <ui:repeat value="#{data.pieData}" var="item">
                <p:data key="#{item.name}" value="#{item.value-10}" />
            </ui:repeat>
        </p:series>
    </p:barchart>


    <p:linechart title="Line Chart3D" width="500" height="500"
                 is3D="true" legend="true"
                 domainAxisLabel="domain" rangeAxisLabel="range" foo="bar">

        <p:series key="data1" seriesPaint="bar"  seriesStroke="dot2">
            <ui:repeat value="#{data.pieData}" var="item">
                <p:data key="#{item.name}" value="#{item.value}" />
            </ui:repeat>
            <p:data key="foo" value="75.1" />
        </p:series>

        <p:series key="data2" seriesPaint="green"  seriesStroke="dot2">
            <p:data key="foo" value="75.1" />
            <ui:repeat value="#{data.pieData}" var="item">
                <p:data key="#{item.name}" value="#{item.value+5}" />
            </ui:repeat>
        </p:series>

        <p:series key="data3">
            <p:data key="foo" value="10" />
            <ui:repeat value="#{data.pieData}" var="item">
                <p:data key="#{item.name}" value="#{item.value+12}" />
            </ui:repeat>
        </p:series>

    </p:linechart>

    <p:linechart title="Line Chart" width="500" height="500"
                 is3D="false" legend="true"
                 domainAxisLabel="domain" rangeAxisLabel="range" foo="bar">

        <p:series key="data1" seriesPaint="green"  seriesStroke="dot2">
            <ui:repeat value="#{data.pieData}" var="item">
                <p:data key="#{item.name}" value="#{item.value}" />
            </ui:repeat>
            <p:data key="foo" value="75.1" />
        </p:series>

        <p:series key="data2" seriesPaint="bar"  seriesStroke="dot2">
            <p:data key="foo" value="75.1" />
            <ui:repeat value="#{data.pieData}" var="item">
                <p:data key="#{item.name}"  value="#{item.value+5}" />
            </ui:repeat>
        </p:series>

        <p:series key="data3">
            <p:data key="foo" value="10" />
            <ui:repeat value="#{data.pieData}" var="item">
                <p:data key="#{item.name}" value="#{item.value+6}" />
            </ui:repeat>
        </p:series>

    </p:linechart>
</p:document>

